package cn.kivensoft.util;

/** 快速异常类, 不创建异常堆栈
 * @author kiven lee
 * @version 1.0
 */
public class FastError extends Throwable {
	private static final long serialVersionUID = 1L;
	private final int code;

	public FastError(String message) {
		this(0, message);
	}

	public FastError(int code, String message) {
		super(message, null, false, false);
		this.code = code;
	}

	public FastError(String fmt, Object... args) {
		this(0, fmt, args);
	}

	public FastError(int code, String fmt, Object... args) {
		this(0, Fmt.fmt(fmt, args));
	}

	public int getCode() {
		return code;
	}
}
